import request from '@/utils/request'

// 查询检测项列表
export function listIndex(query) {
  return request({
    url: '/qc/index/list',
    method: 'get',
    params: query
  })
}

// 查询检测项详细
export function getIndex(indexId) {
  return request({
    url: '/qc/index/' + indexId,
    method: 'get'
  })
}

// 新增检测项
export function addIndex(data) {
  return request({
    url: '/qc/index',
    method: 'post',
    data: data
  })
}

// 修改检测项
export function updateIndex(data) {
  return request({
    url: '/qc/index',
    method: 'put',
    data: data
  })
}

// 删除检测项
export function delIndex(indexId) {
  return request({
    url: '/qc/index/' + indexId,
    method: 'delete'
  })
}
